<%--
  Created by IntelliJ IDEA.
  User: dailyblue
  Date: 2023/4/9
  Time: 10:18
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" isELIgnored="false" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>展示购物车</title>
</head>
<body>
<h3>购物车详情</h3>
<c:set var="sum" value="0"/>
<c:forEach var="c" items="${CART}">
    <p>名称：${c.name}&nbsp;价格：${c.price}&nbsp;数量：${c.num}</p>
    <c:set var="sum" value="${sum+c.price*c.num}"/>
</c:forEach>
<p>
    <b>
        总价：${sum}元
    </b>
</p>
</body>
</html>

